package com.cainli.szbus.ui;

import java.util.ArrayList;

import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.view.Menu;

import com.cainli.szbus.R;
import com.cainli.szbus.data.requestmanager.SZBusRequestManager;
import com.foxykeep.datadroid.requestmanager.Request;

/**
 * 
 * @author cainli
 *
 */
public class BaseActivity extends FragmentActivity {
	private static final String SAVED_STATE_REQUEST_LIST = "savedStateRequestList";
	protected SZBusRequestManager mRequestManager;
	protected ArrayList<Request> mRequestList;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		mRequestManager = SZBusRequestManager.from(this);
//		if (savedInstanceState != null) {
//			mRequestList = savedInstanceState
//					.getParcelableArrayList(SAVED_STATE_REQUEST_LIST);
//		} else {
//			mRequestList = new ArrayList<Request>();
//		}
		mRequestList = new ArrayList<Request>();
	}

	@Override
	protected void onSaveInstanceState(Bundle outState) {
		super.onSaveInstanceState(outState);
//		outState.putParcelableArrayList(SAVED_STATE_REQUEST_LIST, mRequestList);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

}
